package com.woniuxy.store.core.controller;


import com.woniuxy.common.CommonResult;
import com.woniuxy.store.core.model.PmComplain;
import com.woniuxy.store.core.service.PmComplainService;
import com.woniuxy.store.core.vo.ComplainVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gmx
 * @since 2021-07-06
 */
@RestController
@RequestMapping("pmComplain")
public class PmComplainController {
    @Resource
    private PmComplainService complainService;
    /**
     * Description : 查询商家所有投诉
     * ChangeLog : 1. 创建 (2021/7/6 14:30 [fulang]);
     * @param storeId
     * @return com.woniuxy.common.CommonResult<java.util.List<com.woniuxy.store.core.model.PmComplain>>
    */
    @GetMapping("selectComplain")
    public CommonResult<List<PmComplain>> selectComplain(Integer storeId){
        List<ComplainVo> complainVos = complainService.selectComplain(storeId);
        return CommonResult.success(complainVos);
    }
}

